package kr.hkit.powerjava.chapter22.collection;

import java.util.*;

public class SetTest {
	public static void main(String[] args) {
		HashSet<String> hashSet = new HashSet<>(); //중복허용x
		hashSet.add("A");
		hashSet.add("B");
		hashSet.add("C");
		hashSet.add("A");
		
		System.out.println(hashSet);
		
		Set<String> tree = new TreeSet<>();				//자동정렬해줌
		tree.add("C");
		tree.add("B");
		tree.add("D");
		tree.add("A");
		
		System.out.println(tree);
	}
}
